package com.zmzncs.lmtc.module.shop.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zmzncs.lmtc.common.pojo.PageVO;
import com.zmzncs.lmtc.common.pojo.Rest;
import com.zmzncs.lmtc.common.util.JsonUtil;
import com.zmzncs.lmtc.common.util.RestUtil;
import com.zmzncs.lmtc.module.shop.pojo.park_ticket_set.ParkTicketSetDTO;
import com.zmzncs.lmtc.module.shop.pojo.park_ticket_set.ParkTicketSetSearchForm;
import com.zmzncs.lmtc.module.shop.pojo.park_ticket_set.ParkTicketSetVO;
import com.zmzncs.lmtc.module.shop.service.ParkTicketSetService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商户-停车券-配置 前端控制器
 * </p>
 *
 * @author 高博文
 * @since 2021-06-30
 */
@Api(tags = "商户-停车券-配置")
@RestController
@RequestMapping("/shop/park-ticket-set")
public class ParkTicketSetController {

    @Autowired
    ParkTicketSetService parkTicketSetService;


    @ApiOperation(value = "查询店铺停车券")
    @GetMapping(value = "/get-park-ticket-by-coordinate")
    public Rest<PageVO<ParkTicketSetVO>> getParkTicketByCoordinate( ParkTicketSetSearchForm form) {

        IPage<ParkTicketSetDTO> iPage = parkTicketSetService.getParkTicketByCoordinate(form);
        PageVO<ParkTicketSetVO> pageVO = JsonUtil.pageTransform(iPage, ParkTicketSetVO.class);

        return RestUtil.success(pageVO);
    }
}

